{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.useUpload = void 0;\nvar _react = require(\"react\");\nvar _useUpload = require(\"./library/use-upload\");\nconst useUpload = beforeRequest => {\n  const [state, setState] = (0, _react.useState)({\n    loading: false,\n    done: false\n  });\n  const upload = (0, _useUpload.useUploadCreator)({\n    beforeRequest,\n    setState,\n    updateState: setState\n  });\n  return [upload, state];\n};\nexports.useUpload = useUpload;","map":{"version":3,"names":["Object","defineProperty","exports","value","useUpload","_react","require","_useUpload","beforeRequest","state","setState","useState","loading","done","upload","useUploadCreator","updateState"],"sources":["/data/messenger.client/node_modules/@zach.codes/use-upload/lib/react.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.useUpload = void 0;\n\nvar _react = require(\"react\");\n\nvar _useUpload = require(\"./library/use-upload\");\n\nconst useUpload = beforeRequest => {\n  const [state, setState] = (0, _react.useState)({\n    loading: false,\n    done: false\n  });\n  const upload = (0, _useUpload.useUploadCreator)({\n    beforeRequest,\n    setState,\n    updateState: setState\n  });\n  return [upload, state];\n};\n\nexports.useUpload = useUpload;"],"mappings":"AAAA,YAAY;;AAEZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAC3CC,KAAK,EAAE;AACT,CAAC,CAAC;AACFD,OAAO,CAACE,SAAS,GAAG,KAAK,CAAC;AAE1B,IAAIC,MAAM,GAAGC,OAAO,CAAC,OAAO,CAAC;AAE7B,IAAIC,UAAU,GAAGD,OAAO,CAAC,sBAAsB,CAAC;AAEhD,MAAMF,SAAS,GAAGI,aAAa,IAAI;EACjC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAEL,MAAM,CAACM,QAAQ,EAAE;IAC7CC,OAAO,EAAE,KAAK;IACdC,IAAI,EAAE;EACR,CAAC,CAAC;EACF,MAAMC,MAAM,GAAG,CAAC,CAAC,EAAEP,UAAU,CAACQ,gBAAgB,EAAE;IAC9CP,aAAa;IACbE,QAAQ;IACRM,WAAW,EAAEN;EACf,CAAC,CAAC;EACF,OAAO,CAACI,MAAM,EAAEL,KAAK,CAAC;AACxB,CAAC;AAEDP,OAAO,CAACE,SAAS,GAAGA,SAAS"},"metadata":{},"sourceType":"script"}